package common.module
{
	import flash.utils.Dictionary;
	
	import spark.modules.Module;
	
	/**
	 * 适配器模块类
	 */
	public class AdapterModule extends Module implements ISuperModule{
		[Bindable]public var moduleName:String;//模块名称
		private var params:Dictionary;//传递过来的参数键值关系
		public var beforeDesotryCallBack:Function;
		public function AdapterModule(){
			super();
		}
		/**
		 * 是否需要验证离开模块
		 */
		public function validateExit():Boolean{
			return false;
		}
		
		public function destroy():void
		{
		}
		
		/**
		 * 加载模块名称和参数数组
		 * @param moduleName 模块名称
		 * @param params 参数键值关系
		 */
		public function loadData(moduleName:String,params:Dictionary=null):void{
			this.moduleName = moduleName;
			this.params = params;
		}
		
		/**
		 * 根据参数Key获取
		 */
		public function getParamValue(paramKey:String):Object{
			return (params && params[paramKey])?params[paramKey]:null;
		}
	}
}